package model;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class WriteIntegerToFile {
	public static void main(String[] args) {
		File fOut = new File("b.txt");
		
		PrintWriter out;
		
		try {
			out = new PrintWriter(fOut);
			
			Scanner scanner = new Scanner(System.in);
			int[] a = new int[5];
			
			for(int i = 0; i < 5; i++) {
				System.out.println("So thu " + i + ": ");
				a[i] = scanner.nextInt();
			}
			
			for(int i = 0; i < 5; i++) {
				out.println(a[i]);
			}
			
			out.close();
		}
		catch(FileNotFoundException e) {
			System.out.println("Error: " + e);
		}
	}

}
